import {_decorator, Component, Sprite} from 'cc';
import {HeadComp} from "db://assets/script/game/mainui/head-comp";
import {configsHelper} from "db://assets/script/configs-helper";
import Long from "long";

const {ccclass, property} = _decorator;

@ccclass('TalentHeadComp')
export class TalentHeadComp extends Component {
    @property(HeadComp)
    head!: HeadComp;

    @property(Sprite)
    talentBg!: Sprite;


    start() {

    }

    setHead(id: Long, gender: number, talent: number, masterId: string) {
        this.head.setHead(id, gender, talent, masterId)
        this.talentBg.color = configsHelper.loadTalentColor(talent);
    }

    update(deltaTime: number) {

    }
}


